﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Carbon.Web.Forms.Converters;
using System.ComponentModel;

namespace Carbon.Web.Forms.Controls
{
    public abstract class FileUploadEditor : ViewControlBase
    {
        private int m_MaxNumberOfFiles = 1000;
        public int MaxNumberOfFiles
        {
            get
            {
                return m_MaxNumberOfFiles;
            }
            set
            {
                m_MaxNumberOfFiles = value;
            }
        }

        private String[] m_AllowedExtensions = default(String[]);
        [TypeConverter(typeof(SemicolonDelimitedStringToListConverter))]
        public String[] AllowedExtensions
        {
            get
            {
                if (m_AllowedExtensions == null)
                    m_AllowedExtensions = EmptyArray<string>.Instance;
                return m_AllowedExtensions;
            }
            set
            {
                m_AllowedExtensions = value;
            }
        } 
    }
}
